Skip to content

feat(pi-continuous-learning): configure analyzer provider#100

Merged
MattDevy merged 3 commits intoMattDevy:mainfrom
riffingonsoftware:continuous-learning-provider-config
Apr 27, 2026
Merged

feat(pi-continuous-learning): configure analyzer provider#100
MattDevy merged 3 commits intoMattDevy:mainfrom
riffingonsoftware:continuous-learning-provider-config

Conversation

@riffingonsoftware
Copy link
Copy Markdown
Contributor

Summary

Allows configuration of the provider. The model was already configurable, but the provider was hard-coded to Anthropic, limiting options. This preserves the same behavior at defaults, but allows for it to be configured/overridden.

Checklist

  • npm run check passes locally (tests, lint, typecheck)
  • New behaviour is covered by tests
  • Commit messages follow Conventional Commits (feat:, fix:, docs:, etc.)

…nd deduplicate AuthStorage

Use isKnownProvider() guard (via getProviders()) to validate the configured
provider before calling getModel, giving a clear error on unknown providers
without needing unsafe casts. Remove redundant DEFAULT_CONFIG fallbacks since
loadConfig always merges defaults. Create a single AuthStorage instance per
run and thread it through analyzeProject/consolidateProject instead of
constructing one per project.
…rors and add missing test

Throws 'Unknown analyzer provider: {id}' when the provider string is not
registered, instead of conflating it with the unknown-model message.
Adds a test covering the !isKnownProvider branch.
Copy link
Copy Markdown
Owner

@MattDevy MattDevy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this, @riffingonsoftware! The approach is clean and well thought-out.

A few things I particularly liked:

  • The extraction of resolveAnalyzerModel into its own module with dedicated tests is a great call.
  • The backwards-compatible default (Anthropic Haiku) means no existing users are affected.
  • The error messages are specific and actionable.

I made a couple of small follow-up tweaks on top of your commits:

  • Replaced the as-never cast with a proper isKnownProvider type guard (keeping it type-safe without the cast).
  • Sharpened the error distinction between an unknown provider string vs. an unknown model ID for that provider.

Both were minor polish on an already solid implementation. Thanks again for the contribution! 🙌

@MattDevy MattDevy merged commit 034d32b into MattDevy:main Apr 27, 2026
3 checks passed
@MattDevy MattDevy mentioned this pull request Apr 27, 2026
MattDevy added a commit that referenced this pull request Apr 27, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>pi-continuous-learning: 0.14.0</summary>

##
[0.14.0](pi-continuous-learning-v0.13.2...pi-continuous-learning-v0.14.0)
(2026-04-27)


### Features

* **pi-continuous-learning:** Configure analyzer provider
([#100](#100))
([034d32b](034d32b))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants